package com.wwh.furns.service.impl;

import com.wwh.furns.dao.AdminDAO;
import com.wwh.furns.dao.impl.AdminDAOImpl;
import com.wwh.furns.entity.Admin;
import com.wwh.furns.service.AdminService;

/**
 * @author Albert
 * @date 2024/5/30-19:41
 * @describe
 */
public class AdminServiceImpl implements AdminService {
    AdminDAO adminDAO = new AdminDAOImpl();
    @Override
    public Admin getAdminByUsernameAndPassword(String username, String password) {
        return adminDAO.getAdminByUsernameAndPassword(username, password);
    }

    @Override
    public boolean loginAdmin(Admin admin) {
        return getAdminByUsernameAndPassword(admin.getUsername(), admin.getPassword()) != null;

    }
}
